load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

java_library(
  name = "aes_gcm_hkdf_streaming_proto_serialization",
  srcs = ["AesGcmHkdfStreamingProtoSerialization.java"],
  deps = [
      "//proto:aes_gcm_hkdf_streaming_java_proto",
      "//proto:common_java_proto",
      "//proto:tink_java_proto",
      "//src/main/java/com/google/crypto/tink:accesses_partial_key",
      "//src/main/java/com/google/crypto/tink:secret_key_access",
      "//src/main/java/com/google/crypto/tink/internal:key_parser",
      "//src/main/java/com/google/crypto/tink/internal:key_serializer",
      "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
      "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
      "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
      "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
      "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
      "//src/main/java/com/google/crypto/tink/internal:util",
      "//src/main/java/com/google/crypto/tink/streamingaead:aes_gcm_hkdf_streaming_key",
      "//src/main/java/com/google/crypto/tink/streamingaead:aes_gcm_hkdf_streaming_parameters",
      "//src/main/java/com/google/crypto/tink/util:bytes",
      "//src/main/java/com/google/crypto/tink/util:secret_bytes",
      "@maven//:com_google_code_findbugs_jsr305",
      "@maven//:com_google_protobuf_protobuf_java",
],
)

android_library(
  name = "aes_gcm_hkdf_streaming_proto_serialization-android",
  srcs = ["AesGcmHkdfStreamingProtoSerialization.java"],
  deps = [
      "//proto:aes_gcm_hkdf_streaming_java_proto_lite",
      "//proto:common_java_proto_lite",
      "//proto:tink_java_proto_lite",
      "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
      "//src/main/java/com/google/crypto/tink:secret_key_access-android",
      "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
      "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
      "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
      "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
      "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
      "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
      "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
      "//src/main/java/com/google/crypto/tink/internal:util-android",
      "//src/main/java/com/google/crypto/tink/streamingaead:aes_gcm_hkdf_streaming_key-android",
      "//src/main/java/com/google/crypto/tink/streamingaead:aes_gcm_hkdf_streaming_parameters-android",
      "//src/main/java/com/google/crypto/tink/util:bytes-android",
      "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
      "@maven//:com_google_code_findbugs_jsr305",
      "@maven//:com_google_protobuf_protobuf_javalite",
  ],
)

java_library(
  name = "legacy_aes_gcm_hkdf_streaming_test_key_manager",
  srcs = ["LegacyAesGcmHkdfStreamingTestKeyManager.java"],
  deps = [
      "//proto:aes_gcm_hkdf_streaming_java_proto",
      "//proto:common_java_proto",
      "//proto:tink_java_proto",
      "//src/main/java/com/google/crypto/tink:key_manager",
      "//src/main/java/com/google/crypto/tink:registry",
      "//src/main/java/com/google/crypto/tink:streaming_aead",
      "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_hkdf_streaming",
      "//src/main/java/com/google/crypto/tink/subtle:validators",
      "@maven//:com_google_protobuf_protobuf_java",
  ],
  testonly = 1,
)

android_library(
  name = "legacy_aes_gcm_hkdf_streaming_test_key_manager-android",
  testonly = 1,
  srcs = ["LegacyAesGcmHkdfStreamingTestKeyManager.java"],
  deps = [
      "//proto:aes_gcm_hkdf_streaming_java_proto_lite",
      "//proto:common_java_proto_lite",
      "//proto:tink_java_proto_lite",
      "//src/main/java/com/google/crypto/tink:key_manager-android",
      "//src/main/java/com/google/crypto/tink:registry-android",
      "//src/main/java/com/google/crypto/tink:streaming_aead-android",
      "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_hkdf_streaming-android",
      "//src/main/java/com/google/crypto/tink/subtle:validators-android",
      "@maven//:com_google_protobuf_protobuf_javalite",
  ],
)

java_library(
  name = "legacy_full_streaming_aead",
  srcs = ["LegacyFullStreamingAead.java"],
  deps = [
      "//proto:tink_java_proto",
      "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
      "//src/main/java/com/google/crypto/tink:registry",
      "//src/main/java/com/google/crypto/tink:streaming_aead",
      "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key",
      "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
  ],
)

android_library(
  name = "legacy_full_streaming_aead-android",
  srcs = ["LegacyFullStreamingAead.java"],
  deps = [
      "//proto:tink_java_proto_lite",
      "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
      "//src/main/java/com/google/crypto/tink:registry-android",
      "//src/main/java/com/google/crypto/tink:streaming_aead-android",
      "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key-android",
      "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
  ],
)
